package com.gydx.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.gydx.mapper.PersonMapper;
import com.gydx.pojo.Person;
import com.gydx.pojo.PersonExample;
import com.gydx.pojo.PersonExample.Criteria;
import com.gydx.service.PersonService;
@Service
@Transactional
public class PersonServiceImpl implements PersonService {
	@Autowired
	PersonMapper personMapper;


	@Override
	public List<Person> findPerLikeName(String name) {
		// TODO Auto-generated method stub
		
		PersonExample pe = new PersonExample();
		
		Criteria criteria = pe.createCriteria();
		
		criteria.andNameLike("%"+name+"%");
		return personMapper.selectByExample(pe);
	}
}
